<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>焦点学苑</title>
<link rel="stylesheet" href="css/base.css">
<link rel="stylesheet" href="css/style.css">

<!-- vue -->
<script type="text/javascript" src="https://lib.baomitu.com/vue/2.6.12/vue.min.js"></script>
<!-- axios -->
<script type="text/javascript" src="https://cdn.bootcdn.net/ajax/libs/axios/0.21.0/axios.min.js"></script>
<!-- 需要先引入 vue 再引入控件 -->
<script src="js/top.js"></script>
<script src="js/category.js"></script>
</head>

<body>


<div class="header">
    <div class="head wrap" id="login_1">
          <div class="logo fl"><a href=""><img src="images/logo.png"></a></div>
          <div class="head-right fr">
             <!--  <div class="head-a fr">
                   <div class="head-a1 fl"><a href=""><img src="images/tb-a.png"></a></div>
                   <div class="head-a1 fl"><a href=""><img src="images/tb-b.png"></a></div>
                   
                   <top></top>
                    <div class="head-a3 login-click fl" id="uname" style="display:none"></div>
                  
 					<div class="head-a3 login-click fl" id="loginAndUser">登录</div> 
 					<div class="head-a4 reg-click fl"  id="newUser">注册</div>
              
              </div> -->
              <top></top>
              <div class="clearfix"></div>
              <div class="nav fr">
                  <ul>
                   		<li v-if="role" id="contr"><a href="admin/manage-index.html">管理</a></li>
                       	<li class="nav-cut"><a href="index.html">首页</a></li>
                      	<li><a href="">文章</a>
                                     <category></category>
                      	</li>
                    	<li><a href="community.html">社区</a></li>
                       	<li><a href="course.html">课程</a></li>
                      	<li><a href="active.html">活动</a></li>
                   	    <li><a href="contact.html">联系我们</a></li>
                  </ul>
              </div>
              <div class="clearfix"></div>
          </div>
    </div>
    
 <script >
    
    var v2 = new Vue({
    	el:"#login_1",
    	data :{
    		role :""
    	},
    	created(){
    		axios.get("getloginUser.s").then(res=>{
    			if(res.data!=null){
    				this.role=res.data.role;
    				if(this.role==1){
    					this.role=res.data;
    				}else{
    					this.role=null;
    				}
    			}else{
    				this.role=res.data;
    			}
    			
    		});
    	},
    	
    });
    
    </script>
</div>


<div class="content">
<!--     <div class="idx-banner"> -->
<!--             <div class="fullSlide"> -->
<!--                    <div class="box"> -->
<!--                         <ul> -->
<!--                            <li style="background:url(upload/ban.jpg) no-repeat center center;"> -->
<!--                                   <a href="javascript:;"></a></li> -->
<!--                            <li style="background:url(upload/ban.jpg) no-repeat center center;"> -->
<!--                                   <a href="javascript:;"></a></li> -->
<!--                            <li style="background:url(upload/ban.jpg) no-repeat center center;"> -->
<!--                                   <a href="javascript:;"></a></li> -->
<!--                         </ul> -->
<!--                     </div> -->
<!--                     <div class="hbox"> -->
<!--                         <ul></ul> -->
<!--                     </div>  -->
<!--             </div> -->
<!--     </div> -->
    <div class="head"></div>
    <div class=" wrap">
          <div class="cont-box">
               <div class="cont-a fl">
                     <div class="cont-a1"><a href="">新手上路</a><span>|</span><a href="">官方Q群</a><span>|</span><a href="">官方Q群</a></div>
                     <div class="cont-a1"><a href="">新手上路</a><span>|</span><a href="">官方Q群</a><span>|</span><a href="">官方Q群</a></div>
               </div>
               
               <div class="cont-b fl">
                      <div class="cont-b1">
                          <input type="text" class="cont-text fl" value="">
                          <input type="button" class="cont-btn fl">
                      </div>
                      <div class="cont-b2">热门搜索：交友  学习  课程  论坛</div>
               </div>
               
               <div class="cont-c fr">
                  <div class="cont-c1 fl">课程咨询<a href=""><img src="images/QQ.jpg"></a><a href=""><img src="images/QQ.jpg"></a></div>
                  <div class="cont-c2 fr"></div>
               </div>
        </div> 
                          <div class="art-c">
                        <div  class="art-fl fl">
                               <div class="ru-title art-title">
                                       <div class="cou-b1"><img src="images/cou-b1.jpg">焦点文章</div>
                                       <div class="ru-a1">
                                             <div class="sort">排序</div>
                                       </div>
                                       <div class="ru-a2">
                                             <div class="dropdown">
                                                    <span>情感</span>
                                                     <ul data-value="" class="droplist">
                                                                <li data-id="1">全部</li>
                                                                <li data-id="2">服饰</li>
                                                                <li data-id="3">最新</li>
                                                                <li data-id="4">提问</li>
                                                                <li data-id="5">约会技巧</li>
                                                                <li data-id="6">热门文章</li>
                                                     </ul>
                                             </div>
                                       </div>
                               </div>
                               <div class="tjk" >
                                    <ul v-for ="f in list" class="art-ul">
                                         <a :href="f.url"><li><div class="art-list">
                                                          <div class="art-d fl"><img :src="f.pics"></div>
                                                          <div class="art-e fl">
                                                                <div class="col-b1">{{f.fname}}</div>
                                                                <div class="col-b2">焦点学苑<span>2021-5-02</span></div>
                                                                <div class="col-b3">学会换位思考，将会使你的情商得到提高。</div>
                                                          </div>
                                                          <div class="art-f">
                                                                <span><img src="images/col-c1.jpg">0</span>
                                                                <span><img src="images/col-c2.jpg">3</span>
                                                                <em><img src="images/col-c3.jpg"></em>
                                                                <em><img src="images/col-c4.jpg"></em>
                                                                <em><img src="images/col-c5.jpg"></em>
                                                          </div>
                                                 </div>
                                                 <div class="art-g"></div>         
                                          </li></a>
                                          
                                    </ul>
                               </div>
                               <script >
                             	new Vue({
                            	   el : ".tjk",
                            	   data : {
                            		   list : []
                            	   },
                            	   created(){
                            		   axios.post("friend.s").then(res=>{
                            			   this.list = res.data;
                            		   });
                            	   }
                               });
                               
                               </script>
                               <div class="more"><a href="">查看更多>></a></div>
                        
                        </div>
                        
                        <div class="art-fr fr" id ="news">
                               <div class="post-y art-gg">
                                     <div class="post-y1"><img src="images/cou-b1.jpg">最新文章</div>
                                     <ul>
                                      <a href=""><li>
                                           <div class="post-y2"><img src="upload/mt1.jpg" width=200px></div>
                                           <div class="post-y3">山水1</div>
                                      
                                      </li></a>
                                      
                                      <a href=""><li>
                                           <div class="post-y2"><img src="upload/mt2.jpg" width=200px></div>
                                           <div class="post-y3">山水2</div>
                                      
                                      </li></a>
                                      
                                      <a href=""><li>
                                           <div class="post-y2"><img src="upload/mt3.jpg" width=200px></div>
                                           <div class="post-y3">山水3</div>
                                      
                                      </li></a>
                                      
                                      <a href=""><li>
                                           <div class="post-y2"><img src="upload/mt4.jpg" width=200pxx></div>
                                           <div class="post-y3">山水4</div>
                                      
                                      </li></a>
           
                                 </ul>
                               </div>
                               <script>
                               new Vue({
                            	   el : "#news",
                               })
                               
                               </script>
                               <div class="fish"><a href=""><img src="upload/ru-c1.png"></a></div>
                        </div>
                </div>
          
<!--           <div class="idx-btm"><a href=""><img src="upload/act-f.jpg"></a></div> -->
    </div><!--wrap-->  
</div>



<!--底部-->
<div class="footer">
   <div class="wrap">
      <div class="foot">
            <div class="foot-left fl">
                 <a href="">关于我们</a>
                 <a href="">加入我们</a>
                 <a href="contact.html">联系我们</a>
                 <a href="">媒体采访</a>
            </div>
            <div class="foot-c fl"><a href=""><img src="images/foot-logo.jpg"></a></div>
            <div class="foot-right fr">
                 <a href="">同城活动</a>
                 <a href="">课程资讯</a>
                 <a href="">最新发布</a>
                 <a href="">热门文章</a>
            </div>
       </div> 
       <div class="foot-btm">网页制作by云邦</div>    
   </div>
</div>


<div class="mask"></div>

<div class="login">
    <div class="login-title">
        <div class="login-a">登录</div>
        <div class="login-b"></div>
        <div class="login-c close">x</div>
    </div>
    <div id="login1" class="login-btm">
        <div class="login-d"><input v-model="user.uname" type="text" class="login-text" placeholder="注册时填写的用户名"></div>
        <div class="login-d"><input v-model="user.upass" type="password" class="login-pas" placeholder="密码"></div>
        <div class="login-d"><input  @click.prevent="login" type="button" class="login-btn" v-model:value="bname"></div>
        <div class="login-f">
             <a href="">忘记密码</a>
             <span>还没有焦点账号?><a href="javascript:;" class="reg-href">点击注册</a></span>
        </div>
    </div>
</div>
<script>

var v1  = new Vue({
	el:"#login1",
	data : {
		user : { uname: "",upass:"" },
		bname:"登录",
	},
	
	methods:{
		
		login(){
			console.info("sss");
			var params = new URLSearchParams();
			params.append("username",this.user.uname);
			params.append("password",this.user.upass);
			
			axios.post("user/login.s",params).then(res=>{
				
				/* 	code 0 1
					msg 
					data  */
				
				 if(res.data.role==1){
					console.info(res);
					location.href="admin/manage-index.html"; 
				 }else if(res.data.uid){ 
					 console.info(res);
					//关闭div
					$(".mask,.login").css("display", "none");
					//隐藏“登录”div
					$("#loginAndUser").hide(); 
					//显示用户名div
					$("#uname").show();
					//用户名文本对应
					$("#uname").text(this.user.uname);
					//隐藏“注册”div
					$("#newUser").hide();
					location.href="index.html";
				}else{
					$("#loginAndUser").show();
					$("#uname").hide();
					alert(res.data.msg);
				} 
				
			})
		}
	}
});

</script>
<div class="reg" id="regist">
    <div class="login-title">
        <div class="login-a">注册</div>
        <div class="login-b"></div>
        <div class="login-c close">x</div>
    </div>
    <div class="login-btm">
        <div class="login-d"><input v-model="user.uname" type="text" class="login-text" placeholder="用户名"></div>
        <div class="login-d"><input v-model="user.upass" type="password" class="login-pas" placeholder="密码"></div>
        <div class="login-d"><input @click.prevent="regist" type="button" class="login-btn" value="注册"></div>
        <div class="login-f">
             <a href="">忘记密码</a>
        </div>
    </div>
</div>
<script>
var v6 = new Vue({
	el:"#regist",
	data:{
		user:{uname:"",upass:""},
		
	},
	methods:{
		regist(){
			var params = new URLSearchParams();
			params.append("username",this.user.uname);
			params.append("password",this.user.upass);
			axios.post("user/regist.s",params).then(res=>{
				if(res.data.code){
					alert("注册成功！");
					$(".msk,.reg").css("display","none");
					
				}else{
					alert(res.data.msg);
					
				}
			})
		}
	}
})
</script>

<script src="js/jquery-1.11.1.min.js"></script>
<script src="js/jquery.SuperSlide.2.1.1.js"></script>
<script src="js/Action.js"></script>

<!-- <script type="text/javascript">
function a(){
	$(".mask,.login").css("display", "none");
	
}



$(function(){
var nav=$(".header"); //得到导航对象
var win=$(window); //得到窗口对象
var sc=$(document);//得到document文档对象。
win.scroll(function(){
  if(sc.scrollTop()>=580){
    nav.addClass("head-cut"); 
   $(".head-cut").fadeIn(500); 
  }else{
   nav.removeClass("head-cut");
   $(".head-cut").fadeOut(500);
  }
})  
})
</script>
<script type="text/javascript">
  $(function ($) {
            $(".fullSlide").slide({
                titCell: ".hbox ul",
                mainCell: ".box ul",
                effect: "fold",
				mouseOverStop:false,
                autoPlay: true,
                autoPage: true,
                trigger: "click",
                startFun: function (i) {
                    var curLi = jQuery(".fullSlide .bd li").eq(i);
                    if (!!curLi.attr("_src")) {
                        curLi.css("background-image", curLi.attr("_src")).removeAttr("_src")
                    }
                }
            });
          
        });
      
</script> -->
</body>
</html>